package pailaidai.hc.com.mysvgdemo.rxjava;

import android.util.Log;

import java.io.IOException;

import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by Administrator on 2018/6/7.
 */

public class RetrofitDemo {


    public void RetrofitOne() {
      Retrofit retrofit=new Retrofit.Builder()
              .addConverterFactory(GsonConverterFactory.create())
              .baseUrl("")
              .build();
      NewService service=retrofit.create(NewService.class);
        Call<UserInfo> call=service.login("15617565384","sssss");
        call.enqueue(new Callback<UserInfo>() {
            @Override
            public void onResponse(Call<UserInfo> call, Response<UserInfo> response) {
               Log.d("ssssssssssss",response.errorBody().toString());
            }

            @Override
            public void onFailure(Call<UserInfo> call, Throwable t) {

            }
        });




    }


}
